package com.wxq.yaoxia.disease;

import com.wxq.yaoxia.YXBaseSearchResultActivity;

import com.wxq.yaoxia.util.YXConstants;

import android.content.Intent;
import android.database.Cursor;
import android.util.Log;



public class YXDiseaseSearchResultActivity extends YXBaseSearchResultActivity{
	
	public void setLVItemClickAction(int position) {
		cursor.moveToPosition(position);
		Intent newIntent = new Intent();
		newIntent.putExtra(YXConstants.KEY_ID, cursor.getLong(cursor.getColumnIndex(YXConstants.KEY_ID)));
		newIntent.putExtra(YXConstants.COLUMN_Name, cursor.getString(cursor.getColumnIndex(YXConstants.COLUMN_Name)));
		newIntent.putExtra(YXConstants.COLUMN_QueryId, cursor.getString(cursor.getColumnIndex(YXConstants.COLUMN_QueryId)));
		newIntent.setClass(this, YXDiseaseDetail.class);
		startActivity(newIntent);
	}

	public Cursor getDoSearchCursor(String queryString) {
		Log.d("wxq", "开始搜索疾病："+queryString);
		return dbHelper.getDiseaseWithName(queryString);
	}
	
	public Cursor getDoDefaultCursor(String queryString) {
		return dbHelper.getDiseaseWithQueryId(queryString);
	}
	
	public Cursor getCheckData(String queryId)
	{
		return dbHelper.getDiseaseWithID(queryId);
	}
	
}
